LIB1ASMSRC = sh/lib1funcs.asm
LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \
  _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
  $(LIB1ASMFUNCS_CACHE)

LIB2FUNCS_EXTRA=embed-bb.c

embed-bb.c: $(srcdir)/libgcc2.c
	echo '#ifdef inhibit_libc' > $@
	echo '#define L_bb' >> $@
	echo '#undef inhibit_libc' >> $@
	cat $< >> $@
	echo '#endif' >> $@

# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.
FPBIT = fp-bit.c
DPBIT = dp-bit.c

dp-bit.c: $(srcdir)/config/fp-bit.c
	echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
	echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
	echo '#endif' 		>> dp-bit.c
	cat $(srcdir)/config/fp-bit.c >> dp-bit.c

fp-bit.c: $(srcdir)/config/fp-bit.c
	echo '#define FLOAT' > fp-bit.c
	echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
	echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
	echo '#endif' 		>> fp-bit.c
	cat $(srcdir)/config/fp-bit.c >> fp-bit.c

MULTILIB_ENDIAN = ml
MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m2/m3e/m4-single-only/m4-single/m4
MULTILIB_DIRNAMES= 
MULTILIB_MATCHES = m2=m3 m2=m4-nofpu
MULTILIB_EXCEPTIONS = ml

LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib

$(T)crt1.o: $(srcdir)/config/sh/crt1.asm $(GCC_PASSES)
	$(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crt1.o -x assembler-with-cpp $(srcdir)/config/sh/crt1.asm
$(T)crti.o: $(srcdir)/config/sh/crti.asm $(GCC_PASSES)
	$(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/sh/crti.asm
$(T)crtn.o: $(srcdir)/config/sh/crtn.asm $(GCC_PASSES)
	$(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/sh/crtn.asm

$(out_object_file): gt-sh.h
gt-sh.h : s-gtype ; @true

# These are not suitable for COFF.
# EXTRA_MULTILIB_PARTS= crt1.o crti.o crtn.o crtbegin.o crtend.o
